package com.bskj.common.enums;

public enum CouponStatusEnum {
	not_use(0, "未使用"), used(1, "已经使用"), invalid(-1, "无效");

	private int key;
	private String value;

	private CouponStatusEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static CouponStatusEnum get(int key) {
		for(CouponStatusEnum userStatusEnum : CouponStatusEnum.values()) {
			if(userStatusEnum.getKey() == key) {
				return userStatusEnum;
			}
		}
		return null;
	}
}
